from .base import BaseModel
from tortoise import fields


class Role(BaseModel):
    name = fields.CharField(max_length=50, unique=True, description="角色名")
    code = fields.CharField(max_length=20, unique=True, description="角色代码")
    is_active = fields.BooleanField(default=True, description="是否激活")

    class Meta:
        table = "t_role"
        description = "角色表"
